var app = getApp();
Page({
  data: {
  	froms:{}
  },
  onLoad(options) {
  	this.setData({
      froms:wx.getStorageSync('userInfo')
 		});
  },
  formSubmit:function(e){
  	console.log(e.detail.value)
 
  	var that=this;
  	var post=e.detail.value;
  	
  	app.globalAjax(
	  		'/api/cooperate/apply',
	  		"post",
	  		post,
	  		function(e){
	  			if(e.code==0)
	      	{
	      		wx.showToast({
						    title: '提交成功',
						    icon: 'none',
						    duration: 2000,
						    success: function () {
						    	setTimeout(function(){
						    		wx.navigateBack({delta: 1})
						    	},2000)
						    }
						});
	      	}else{
	      		wx.showToast({
				        title: e.msg,
				        icon: "none"
				    });
	      	}
	  	})
  }
})